package com.ehotting.edsta.circuitDesign.generator.domain;

import java.io.Serializable;

/**
 * 元器件
 * @TableName es_element
 */
public class EsElement implements Serializable {
    /**
     * 编号
     */
    private Long id;

    /**
     * 名称
     */
    private String name;

    /**
     * 元器件类型
     */
    private Integer type;

    /**
     * 数据类型
     */
    private Integer data_type;

    /**
     * 序号
     */
    private Integer priority;

    /**
     * 编码
     */
    private String code;

    /**
     * 值
     */
    private String value;

    /**
     * 备注
     */
    private String remarks;

    /**
     * 单位
     */
    private String unit;

    /**
     * 拓展参数,JSON格工
     */
    private String props;

    /**
     * 制造商
     */
    private String manufacturer;

    /**
     * 价格
     */
    private Double price;

    /**
     * 功率
     */
    private Double power;

    /**
     * 面积（平方毫米）
     */
    private Double area;

    private static final long serialVersionUID = 1L;

    /**
     * 编号
     */
    public Long getId() {
        return id;
    }

    /**
     * 编号
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 名称
     */
    public String getName() {
        return name;
    }

    /**
     * 名称
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 元器件类型
     */
    public Integer getType() {
        return type;
    }

    /**
     * 元器件类型
     */
    public void setType(Integer type) {
        this.type = type;
    }

    /**
     * 数据类型
     */
    public Integer getData_type() {
        return data_type;
    }

    /**
     * 数据类型
     */
    public void setData_type(Integer data_type) {
        this.data_type = data_type;
    }

    /**
     * 序号
     */
    public Integer getPriority() {
        return priority;
    }

    /**
     * 序号
     */
    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    /**
     * 编码
     */
    public String getCode() {
        return code;
    }

    /**
     * 编码
     */
    public void setCode(String code) {
        this.code = code;
    }

    /**
     * 值
     */
    public String getValue() {
        return value;
    }

    /**
     * 值
     */
    public void setValue(String value) {
        this.value = value;
    }

    /**
     * 备注
     */
    public String getRemarks() {
        return remarks;
    }

    /**
     * 备注
     */
    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    /**
     * 单位
     */
    public String getUnit() {
        return unit;
    }

    /**
     * 单位
     */
    public void setUnit(String unit) {
        this.unit = unit;
    }

    /**
     * 拓展参数,JSON格工
     */
    public String getProps() {
        return props;
    }

    /**
     * 拓展参数,JSON格工
     */
    public void setProps(String props) {
        this.props = props;
    }

    /**
     * 制造商
     */
    public String getManufacturer() {
        return manufacturer;
    }

    /**
     * 制造商
     */
    public void setManufacturer(String manufacturer) {
        this.manufacturer = manufacturer;
    }

    /**
     * 价格
     */
    public Double getPrice() {
        return price;
    }

    /**
     * 价格
     */
    public void setPrice(Double price) {
        this.price = price;
    }

    /**
     * 功率
     */
    public Double getPower() {
        return power;
    }

    /**
     * 功率
     */
    public void setPower(Double power) {
        this.power = power;
    }

    /**
     * 面积（平方毫米）
     */
    public Double getArea() {
        return area;
    }

    /**
     * 面积（平方毫米）
     */
    public void setArea(Double area) {
        this.area = area;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        EsElement other = (EsElement) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getData_type() == null ? other.getData_type() == null : this.getData_type().equals(other.getData_type()))
            && (this.getPriority() == null ? other.getPriority() == null : this.getPriority().equals(other.getPriority()))
            && (this.getCode() == null ? other.getCode() == null : this.getCode().equals(other.getCode()))
            && (this.getValue() == null ? other.getValue() == null : this.getValue().equals(other.getValue()))
            && (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
            && (this.getUnit() == null ? other.getUnit() == null : this.getUnit().equals(other.getUnit()))
            && (this.getProps() == null ? other.getProps() == null : this.getProps().equals(other.getProps()))
            && (this.getManufacturer() == null ? other.getManufacturer() == null : this.getManufacturer().equals(other.getManufacturer()))
            && (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
            && (this.getPower() == null ? other.getPower() == null : this.getPower().equals(other.getPower()))
            && (this.getArea() == null ? other.getArea() == null : this.getArea().equals(other.getArea()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getData_type() == null) ? 0 : getData_type().hashCode());
        result = prime * result + ((getPriority() == null) ? 0 : getPriority().hashCode());
        result = prime * result + ((getCode() == null) ? 0 : getCode().hashCode());
        result = prime * result + ((getValue() == null) ? 0 : getValue().hashCode());
        result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
        result = prime * result + ((getUnit() == null) ? 0 : getUnit().hashCode());
        result = prime * result + ((getProps() == null) ? 0 : getProps().hashCode());
        result = prime * result + ((getManufacturer() == null) ? 0 : getManufacturer().hashCode());
        result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
        result = prime * result + ((getPower() == null) ? 0 : getPower().hashCode());
        result = prime * result + ((getArea() == null) ? 0 : getArea().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", type=").append(type);
        sb.append(", data_type=").append(data_type);
        sb.append(", priority=").append(priority);
        sb.append(", code=").append(code);
        sb.append(", value=").append(value);
        sb.append(", remarks=").append(remarks);
        sb.append(", unit=").append(unit);
        sb.append(", props=").append(props);
        sb.append(", manufacturer=").append(manufacturer);
        sb.append(", price=").append(price);
        sb.append(", power=").append(power);
        sb.append(", area=").append(area);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}